package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ScanOrderSettingsMapper;
import com.ruoyi.system.domain.ScanOrderSettings;
import com.ruoyi.system.service.IScanOrderSettingsService;

/**
 * 扫码开单设置 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-15
 */
@Service
public class ScanOrderSettingsServiceImpl implements IScanOrderSettingsService
{
    @Autowired
    private ScanOrderSettingsMapper scanOrderSettingsMapper;

    /**
     * 通过id查询扫码开单设置
     *
     * @param id 扫码开单设置主键
     * @return 扫码开单设置
     */
    @Override
    public ScanOrderSettings selectScanOrderSettingsById(Long id)
    {
        return scanOrderSettingsMapper.selectScanOrderSettingsById(id);
    }

    /**
     * 查询扫码开单设置列表
     *
     * @param scanOrderSettings 扫码开单设置
     * @return 扫码开单设置
     */
    @Override
    public List<ScanOrderSettings> selectScanOrderSettingsList(ScanOrderSettings scanOrderSettings)
    {
        return scanOrderSettingsMapper.selectScanOrderSettingsList(scanOrderSettings);
    }

    /**
     * 新增扫码开单设置列表
     *
     * @param scanOrderSettings 扫码开单设置
     * @return 结果
     */
    @Override
    public int insertScanOrderSettings(ScanOrderSettings scanOrderSettings)
    {
        return scanOrderSettingsMapper.insertScanOrderSettings(scanOrderSettings);
    }

    /**
     * 修改扫码开单设置
     *
     * @param scanOrderSettings 扫码开单设置
     * @return 结果
     */
    @Override
    public int updateScanOrderSettings(ScanOrderSettings scanOrderSettings)
    {
        return scanOrderSettingsMapper.updateScanOrderSettings(scanOrderSettings);
    }

    /**
     * 通过id批量删除扫码开单设置信息
     *
     * @param ids 需要删除的扫码开单设置主键
     * @return 结果
     */
    @Override
    public int deleteScanOrderSettingsByIds(Long[] ids)
    {
        return scanOrderSettingsMapper.deleteScanOrderSettingsByIds(ids);
    }

    /**
     * 通过id删除扫码开单设置信息
     *
     * @param id 扫码开单设置主键
     * @return 结果
     */
    @Override
    public int deleteScanOrderSettingsById(Long id)
    {
        return scanOrderSettingsMapper.deleteScanOrderSettingsById(id);
    }

    /**
     * 通过门店id查询扫码开单设置详情
     *
     * @param storeId 门店id
     * @return 扫码开单设置
     */
    @Override
    public ScanOrderSettings selectByStoreId(Long storeId)
    {
        return scanOrderSettingsMapper.selectByStoreId(storeId);
    }
}
